<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateUserScoreHistory extends Migration
{
    public function up()
    {
        Schema::create('user_score_history', function (Blueprint $table) {
            $table->id();
            $table->bigInteger("uid", false, true)->unique();
            $table->string("title", 10);
            $table->decimal("score", 10, 2)->default(0.00);
            $table->bigInteger("user_uid", false, true);
            $table->tinyInteger("type", false, true)->default(0);
            $table->dateTime("created_at");
            $table->dateTime("updated_at");
            $table->softDeletes();
        });
    }

    public function down()
    {
        Schema::dropIfExists('user_score_history');
    }
}
